home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / MISC / HCAL-27 / GUYWIRES.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1997-01-28  |  7.1 KB  |  239 lines

  1. 10  'GUYWIRES - for Antenna Towers - 14 MAR 95 rev.27 SEP 96
  2. 20  CLS:KEY OFF
  3. 30  IF EX$=""THEN EX$="EXIT"
  4. 40  COLOR 7,0,1
  5. 50  PI=3.14159
  6. 60  UL$=STRING$(80,205)
  7. 70  U0$="##
  8. 80  U1$="####.##"
  9. 90  U2$="####"
  10. 100  U3$="#.##"
  11. 110  U4$="###.##"
  12. 120  U5$="###.#"
  13. 130  '
  14. 140  '.....start
  15. 150  CLS:LAST=0
  16. 160  COLOR 15,2
  17. 170  PRINT " GUY WIRES for Antenna Towers and Masts";
  18. 180  PRINT TAB(57);"by George Murphy VE3ERP ";
  19. 190  COLOR 1,0:PRINT STRING$(80,223);
  20. 200  COLOR 7,0
  21. 210  GOSUB 1470    'preface & diagram
  22. 220  COLOR 7,0
  23. 230  CL=CSRLIN:VIEW PRINT CL TO 24:CLS:VIEW PRINT:LOCATE CL
  24. 240  COLOR 0,7:LOCATE 25,22
  25. 250  PRINT " Press 1 to continue or 0 to EXIT.....";
  26. 260  COLOR 7,0
  27. 270  Z$=INKEY$:IF Z$=""THEN 270
  28. 280  IF Z$="0"THEN CLS:RUN EX$
  29. 290  IF Z$="1"THEN 310
  30. 300  GOTO 270
  31. 310  GOSUB 2260    'hardcopy
  32. 320  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  33. 330  GOSUB 1940    'general notes
  34. 340  PRINT UL$;
  35. 350  PRINT " Press number in < > to choose standard units of measure:"
  36. 360  PRINT UL$;
  37. 370  PRINT "   < 1 >  Metric"
  38. 380  PRINT "   < 2 >  U.S.A./Imperial"
  39. 390  Z$=INKEY$
  40. 400  IF Z$="1"THEN U$=" m.":GOTO 430
  41. 410  IF Z$="2"THEN U$=" ft.":GOTO 430
  42. 420  GOTO 390
  43. 430  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  44. 440  PRINT " Press number in < > to select type of antenna supporting structure:"
  45. 450  PRINT UL$;
  46. 460  PRINT "   < 3 >  Tower designed for Amateur Radio antennas."
  47. 470  PRINT "   < 4 >  Standard TV antenna tower."
  48. 480  PRINT "   < 5 >  Thinwall pipe or tubing mast."
  49. 490  PRINT "   < 6 >  Other...."
  50. 500  Z$=INKEY$
  51. 510  IF Z$="3"THEN J=35:J$=" Amateur Radio type tower....":GOTO 560
  52. 520  IF Z$="4"THEN J=20:J$=" TV antenna type tower.......":GOTO 560
  53. 530  IF Z$="5"THEN J=12:J$=" thinwall pipe or tubing mast":GOTO 560
  54. 540  IF Z$="6"THEN J$=     " supporting structure........":GOTO 560
  55. 550  GOTO 500
  56. 560  CLS:GOTO 610
  57. 570  '
  58. 580  LOCATE CSRLIN-1:PRINT "       ";:LOCATE CSRLIN,63:PRINT USING U1$;X;
  59. 590  RETURN
  60. 600  '
  61. 610  '.....input data
  62. 620  IF Z$<>"6"THEN 680
  63. 630  PRINT " ENTER: Maximum vertical distance between guy wire sets (";U$;")";
  64. 640  INPUT J:IF U$=" m."THEN J=J/0.3048
  65. 650  X=J:GOSUB 580:PRINT U$
  66. 660  LOCATE CSRLIN-1:PRINT STRING$(80,32);:LOCATE CSRLIN-1
  67. 670  '
  68. 680  PRINT " ENTER: Height of";J$;"................(";U$;")";
  69. 690  INPUT H:X=H:GOSUB 580:PRINT U$;"     "
  70. 700  PRINT "        MINIMUM distance to anchor points.....................";
  71. 710  PRINT USING U1$;H/SQR(3);:PRINT U$
  72. 720  PRINT "        RECOMMENDED distance to anchor points............about";
  73. 730  PRINT USING U1$;H*0.8;:PRINT U$
  74. 740  PRINT " ENTER: Your choice of distance to anchor points (";U$;").......";
  75. 750  INPUT R
  76. 760  LN=CSRLIN-3:VIEW PRINT LN TO 24:CLS:VIEW PRINT:LOCATE LN
  77. 770  MAX=J:IF U$=" m."THEN MAX=J*0.3048    'maximum segment
  78. 780  THETA=ATN(H/R)   'angle of top set of guy wires
  79. 790  '
  80. 800  '.....find number of guy wire sets
  81. 810  N=0      'reset counter
  82. 820  '
  83. 830  N=N+1
  84. 840  IA=THETA/N      'incremental angle
  85. 850  BOT=R*TAN(IA*(N-1))
  86. 860  TOP=H-BOT
  87. 870  IF TOP>MAX THEN 830
  88. 880  '
  89. 890  PRINT "        Number of guy wire sets...............................";
  90. 900  PRINT USING U2$;N
  91. 910  PRINT "        Guy wire anchors - distance from tower/mast...........";
  92. 920  PRINT USING U1$;R;:PRINT U$
  93. 930  PRINT UL$;
  94. 940  COLOR 0,7:LOCATE ,3:PRINT " Set ";:COLOR 7,0
  95. 950  PRINT TAB(11);
  96. 960  PRINT "Height above   Guy Wire    Tower    Non-Resonant    Anchor"
  97. 970  COLOR 0,7:LOCATE ,3:PRINT " No. ";:COLOR 7,0
  98. 980  PRINT TAB(14);
  99. 990  PRINT "Ground       Length  =   End   +   Segments   +   End      Slope"
  100. 1000  PRINT UL$;
  101. 1010  '
  102. 1020  LIN=0    'line number
  103. 1030      FOR Z=N TO 1 STEP-1
  104. 1040  ANG=IA*Z                          'angle
  105. 1050  EL=TAN(ANG)*R                     'elevation of guy wire attachment
  106. 1060  L=SQR(R^2+EL^2)                   'hypotenuse
  107. 1070  IF U$=" ft." THEN E=1:GW=L-2*E    'length of centre section - feet
  108. 1080  IF U$=" m."  THEN E=0.3:GW=L-2*E   'length of centre section - metres
  109. 1090  IF Z=N THEN 1110
  110. 1100  PRINT USING U4$;LAST-EL;:PRINT U$;" space"
  111. 1110  LAST=EL
  112. 1120  COLOR 0,7:LOCATE ,4
  113. 1130  PRINT USING U0$;Z;:PRINT " ";     'set no.
  114. 1140  COLOR 7,0
  115. 1150  PRINT TAB(11);USING U1$;EL;       'height above ground
  116. 1160  PRINT U$;TAB(24);USING U1$;L;     'length of guy wire
  117. 1170  PRINT U$;TAB(37);USING U3$;E;     'length of tower end
  118. 1180  PRINT U$;
  119. 1190  GOSUB 1310
  120. 1200  PRINT TAB(46);USING "##";C;:PRINT " @";USING U1$;GW/C;
  121. 1210  PRINT U$;TAB(63);USING U3$;E;     'length of anchor end
  122. 1220  PRINT U$;TAB(72);USING U4$;ANG*180/PI;:PRINT "<UNK! {00F8}>EQV"
  123. 1230  LIN=LIN+1
  124. 1240  IF LIN=8 THEN GOSUB 2260:LIN=0:VIEW PRINT 8 TO 24:CLS:LOCATE 8
  125. 1250      NEXT Z
  126. 1260  PRINT UL$;
  127. 1270  PRINT TAB(6);"From each anchor, guy wires are equispaced vertically at";
  128. 1280  PRINT USING U5$;IA*180/PI;:PRINT "<UNK! {00F8}>EQV apart.";
  129. 1290  GOTO 1420
  130. 1300  '
  131. 1310  '.....check for resonance
  132. 1320  IF U$=" m."THEN K1=K1*0.3048:K2=K2*0.3048
  133. 1330  C=1      'divisor
  134. 1340  Y=GW/C:IF U$=" m."THEN Y=Y/0.3048
  135. 1350  A=CINT(0.95*Y):B=CINT(1.05*Y)
  136. 1360  FOR X=A-1 TO B+1
  137. 1370  IF X/16<>INT(X/16) AND X/22<>INT(X/22)THEN 1390
  138. 1380  C=C+1:GOTO 1340
  139. 1390  NEXT X
  140. 1400  RETURN
  141. 1410  '
  142. 1420  '.....end
  143. 1430  GOSUB 2260
  144. 1440  GOTO 140
  145. 1450  END
  146. 1460  '
  147. 1470  '.....preface
  148. 1480  T=7
  149. 1490  PRINT TAB(T);
  150. 1500  PRINT "To support a typical Ham beam antenna this program calculates:"
  151. 1510  PRINT TAB(T);
  152. 1520  PRINT "- Number of guy wire sets required for any given tower/mast height."
  153. 1530  PRINT TAB(T);
  154. 1540  PRINT "- Height above ground for the attachment of each set of guy wires."
  155. 1550  PRINT TAB(T);
  156. 1560  PRINT "- Distance from the tower/mast to the guy wire anchors."
  157. 1570  PRINT TAB(T);
  158. 1580  PRINT "- Quantity and length of non-resonant segments in each guy wire."
  159. 1590  PRINT TAB(T);
  160. 1600  PRINT "- Total length of each guy wire."
  161. 1610  PRINT
  162. 1620  PRINT TAB(T);
  163. 1630  PRINT "The calculations assume three wires per set spaced 120<UNK! {00F8}> apart, with"
  164. 1640  PRINT TAB(T);
  165. 1650  PRINT "three anchor points - each anchoring one wire of each guy wire set."
  166. 1660  PRINT
  167. 1670  COLOR 0,7
  168. 1680  T=8
  169. 1690  LN=CSRLIN:VIEW PRINT LN TO LN+10:CLS:CLS:VIEW PRINT:LOCATE LN
  170. 1700  PRINT TAB(T);
  171. 1710  PRINT "                         TYPICAL GUY WIRE"
  172. 1720  PRINT TAB(T);
  173. 1730  PRINT "                    ( <UNK! {FE20}>= Attachment Fitting )"
  174. 1740  PRINT TAB(T);
  175. 1750  PRINT "                    ( / = Egg Insulator      )"
  176. 1760  PRINT TAB(T);
  177. 1770  PRINT "        CALLDEFSNGSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND Centre Section SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDDEFDBLCALL"
  178. 1780  PRINT TAB(T);
  179. 1790  PRINT "        CALL (may need to be cut into separate non-resonant CALL"
  180. 1800  PRINT TAB(T);
  181. 1810  PRINT "        CALL      segments connected by egg insulators)     CALL"
  182. 1820  PRINT "  Tower";
  183. 1830  PRINT " <UNK! {FEC4}>SOUNDSOUNDSOUNDSOUNDSOUND/SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND/SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND/SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND/SOUNDSOUNDSOUNDSOUNDSOUNDSOUND<UNK! {FE20}>";
  184. 1840  PRINT "Anchor"
  185. 1850  PRINT TAB(T);
  186. 1860  PRINT "DEFDBLCALL30 cm.CALLDEFSNG                slope down SOUNDSOUND>                DEFDBLCALL30 cm.CALLDEFSNG"
  187. 1870  PRINT TAB(T);
  188. 1880  PRINT "DEFDBLCALL12 in.CALLDEFSNG                                              DEFDBLCALL12 in.CALLDEFSNG"
  189. 1890  PRINT TAB(T);
  190. 1900  PRINT " CALLDEFSNGSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND Length SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDDEFDBLCALL "
  191. 1910  PRINT
  192. 1920  RETURN
  193. 1930  '
  194. 1940  '.....notes
  195. 1950  T$=STRING$(7,32)
  196. 1960  PRINT T$;
  197. 1970  PRINT "  The required number of supporting guy wire sets for a tower or"
  198. 1980  PRINT T$;
  199. 1990  PRINT "mast depends on the height of the structure and the minimum spacing"
  200. 2000  PRINT T$;
  201. 2010  PRINT "between guy wire sets recommended for the type of structure and"
  202. 2020  PRINT T$;
  203. 2030  PRINT "local icing and wind conditions. Typical minimum spacings assumed"
  204. 2040  PRINT T$;
  205. 2050  PRINT "by the program are conservative and may be considered as applicable"
  206. 2060  PRINT T$;
  207. 2070  PRINT "for close to 'worst case' site conditions."
  208. 2080  PRINT T$;
  209. 2090  PRINT "  To avoid possible mechanical resonance in the structure that may"
  210. 2100  PRINT T$;
  211. 2110  PRINT "cause it to have a tendency to vibrate, the sets of guys should NOT"
  212. 2120  PRINT T$;
  213. 2130  PRINT "be spaced at equal vertical intervals on the structure."
  214. 2140  PRINT T$;
  215. 2150  PRINT "  The recommended distance of anchor points from the structure is"
  216. 2160  PRINT T$;
  217. 2170  PRINT "about 80% of the structure height. Anchor distances of less than"
  218. 2180  PRINT T$;
  219. 2190  PRINT "58% of the height should be considered as being unsafe."
  220. 2200  PRINT T$;
  221. 2210  PRINT "  This program performs all the calculations required to meet these"
  222. 2220  PRINT T$;
  223. 2230  PRINT "criteria."
  224. 2240  RETURN
  225. 2250  '
  226. 2260  'HARDCOPY
  227. 2270  GOSUB 2380:LOCATE 25,2:COLOR 14,6
  228. 2280  PRINT " Press 1 to print screen, 2 to print screen & ";
  229. 2290  PRINT "advance paper, or 3 to continue.";:COLOR 7,0
  230. 2300  Z$=INKEY$:IF Z$="3"THEN GOSUB 2380:RETURN
  231. 2310  IF Z$="1"OR Z$="2"THEN GOSUB 2380:GOTO 2330
  232. 2320  GOTO 2300
  233. 2330  FOR QX=1 TO 24:FOR QY=1 TO 80
  234. 2340  LPRINT CHR$(SCREEN(QX,QY));
  235. 2350  NEXT QY:NEXT QX
  236. 2360  IF Z$="2"THEN LPRINT CHR$(12)
  237. 2370  GOTO 2270
  238. 2380  LOCATE 25,1:PRINT STRING$(80,32);:RETURN
  239.